package com.gxa.hualianeshop.threadLocal;

import com.gxa.hualianeshop.entity.vo.UserVO;

/**
 * @author bill
 * @date 2023/7/10 16:41
 */
public class UserThreadLocal {

    private static ThreadLocal<UserVO> userThreadLocal = new ThreadLocal<>();

    public static void set(UserVO user){
        userThreadLocal.set(user);
    }

    public static UserVO get(){
        return userThreadLocal.get();
    }

    public static void remove(){
        userThreadLocal.remove();
    }
}
